<%--
  Created by IntelliJ IDEA.
  User: 39504
  Date: 2020/2/27
  Time: 9:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="java.util.List" %>
<%@ page import="com.foreknow.model.Guestbook" %>
<%@ page import="com.foreknow.model.Admin" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="pager" uri="http://blog.zjjlive.net/zjjlive/tags/pager" %>
<%
    String path = request.getContextPath();
%>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet"  href="<%=request.getContextPath()%>/css/bootstrap.min.css">
</head>
<body>
<c:out value=""  default="this is jstl"></c:out>
    <div class="container">
        username:${sessionScope.admin.username}
        <table class="table table-hover">
            <tr>
                <td>id</td>
                <td>name</td>
                <td>phone</td>
                <td>email</td>
                <td>title</td>
                <td>content</td>
                <td>creattime</td>
                <td>
                操作
                </td>
            </tr>

            <c:forEach  var="gb" items="${requestScope.list}" varStatus="status">

            <tr>
                <td>${status.index+1}</td>
                <td>${gb.name}</td>
                <td>${gb.phone}</td>
                <td>${gb.email}</td>
                <td>${gb.title}</td>
                <td>${gb.content}</td>
                <td>${gb.createdtime}</td>
                <td>
                    <a href="<%=path%>/user/manager?id=${gb.id}&q=selectById" class="btn btn-primary">修改</a>
                    <a href="<%=path%>/user/manager?id=${gb.id}&q=delete"     class="btn btn-danger">删除</a>
                </td>
            </tr>
            </c:forEach>

        </table>
        <div>
            <pager:pager pageNo="${requestScope.pageNO}" recordCount="${requestScope.total}" pageSize="${initParam.pageSize}" url="/WebDemoMVC/user/manager?q=list"/>
        </div>
            <a class="btn-info btn" href= ../addmessage.jsp>添加留言信息</a>
    </div>
</body>
</html>
